package com.ruoyi.books.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.books.mapper.BooksBackgroundMapper;
import com.ruoyi.books.domain.BooksBackground;
import com.ruoyi.books.service.IBooksBackgroundService;

/**
 * 非遗背景汇总Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-02
 */
@Service
public class BooksBackgroundServiceImpl implements IBooksBackgroundService 
{
    @Autowired
    private BooksBackgroundMapper booksBackgroundMapper;

    /**
     * 查询非遗背景汇总
     * 
     * @param backgroundId 非遗背景汇总主键
     * @return 非遗背景汇总
     */
    @Override
    public BooksBackground selectBooksBackgroundByBackgroundId(Long backgroundId)
    {
        return booksBackgroundMapper.selectBooksBackgroundByBackgroundId(backgroundId);
    }

    /**
     * 查询非遗背景汇总列表
     * 
     * @param booksBackground 非遗背景汇总
     * @return 非遗背景汇总
     */
    @Override
    public List<BooksBackground> selectBooksBackgroundList(BooksBackground booksBackground)
    {
        return booksBackgroundMapper.selectBooksBackgroundList(booksBackground);
    }

    /**
     * 新增非遗背景汇总
     * 
     * @param booksBackground 非遗背景汇总
     * @return 结果
     */
    @Override
    public int insertBooksBackground(BooksBackground booksBackground)
    {
        return booksBackgroundMapper.insertBooksBackground(booksBackground);
    }

    /**
     * 修改非遗背景汇总
     * 
     * @param booksBackground 非遗背景汇总
     * @return 结果
     */
    @Override
    public int updateBooksBackground(BooksBackground booksBackground)
    {
        return booksBackgroundMapper.updateBooksBackground(booksBackground);
    }

    /**
     * 批量删除非遗背景汇总
     * 
     * @param backgroundIds 需要删除的非遗背景汇总主键
     * @return 结果
     */
    @Override
    public int deleteBooksBackgroundByBackgroundIds(Long[] backgroundIds)
    {
        return booksBackgroundMapper.deleteBooksBackgroundByBackgroundIds(backgroundIds);
    }

    /**
     * 删除非遗背景汇总信息
     * 
     * @param backgroundId 非遗背景汇总主键
     * @return 结果
     */
    @Override
    public int deleteBooksBackgroundByBackgroundId(Long backgroundId)
    {
        return booksBackgroundMapper.deleteBooksBackgroundByBackgroundId(backgroundId);
    }
}
